/**
 * Created by yeanzhi on 15/5/6.
 */
var gulp = require('gulp');
var minifyCss = require('gulp-minify-css'),
    concat = require('gulp-concat'),
    rename = require('gulp-rename'),
    notify = require('gulp-notify'),
    del = require('del'),
    replace = require('gulp-replace'),
    rev = require('gulp-rev'),
    babel = require('gulp-babel');
var revReplace = require('gulp-rev-replace');
var useref = require('gulp-useref');
var filter = require('gulp-filter');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var webpack = require("gulp-webpack");
var merge2 = require('merge2');
var watch = require('gulp-watch');
var gulpif = require('gulp-if');
gulp.task("default", function() {
    return gulp.src('index.js')
        .pipe(webpack({
            output: {
                filename: 'index.min.js'
            },
            module: {
                loaders: [
                    { test: /\.js?$/, loaders: ['react-hot', 'babel'], exclude: /node_modules/ },
                    { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'},
                    { test: /\.css$/, loader: "style-loader!css-loader" }
                ]
            }
        }))
        .pipe(gulp.dest('./'));
});
